import asyncio
from lib.websocket import action

async def heart_beat():
    while True:
        await action.heart_beat()
        data = await action.read()
        # print(f"ws {interval} recv:", data)
        await asyncio.sleep(3)


async def main():
    await action.connect()
    asyncio.create_task(heart_beat())
    await asyncio.sleep_ms(10_000)

asyncio.run(main())
